<!DOCTYPE html>
<html>
<head>
    <script src="https://ssl.captcha.qq.com/TCaptcha.js?v=%@" type="text/javascript"></script>
    <meta name="viewport"
          content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
</head>
<body>
<script type="text/javascript">
                                               (function(){
        // 验证成功返回ticket
        window.SDKTCaptchaVerifyCallback = function (retJson) {
            if (retJson){
              window.jsBridge.getData(JSON.stringify(retJson));
            }
        };
        // 验证码加载完成的回调，用来设置webview尺寸
        window.SDKTCaptchaReadyCallback = function (retJson) {
            if (retJson && retJson.sdkView && retJson.sdkView.width && retJson.sdkView.height &&  parseInt(retJson.sdkView.width) >0 && parseInt(retJson.sdkView.height) >0 ){
               window.jsBridge.getData(JSON.stringify(retJson));
            }
        };
        window.onerror = function (msg, url, line, col, error) {
            if (window.TencentCaptcha == null) {
                 window.jsBridge.getData(JSON.stringify(retJson));
            }
        };
        var sdkOptions = {"sdkOpts": {"width": 265, "height": 265}};
        sdkOptions.ready = window.SDKTCaptchaReadyCallback;
        window.onload = function () {
           //此处需要替换xxxxxx为appid
            new TencentCaptcha("2064285996", SDKTCaptchaVerifyCallback, sdkOptions).show();
        };
    })();

</script>
</body>
</html>
